## Process this file with automake to produce Makefile.in

ACLOCAL_AMFLAGS = -I M4

DISTCHECK_CONFIGURE_FLAGS = --enable-werror

if BUILD_OCTAVE_MOD
octave_dir = Octave
endif

SUBDIRS = M4 Win32 src examples tests

if FULL_SUITE
SUBDIRS += man doc $(octave_dir) regtest programs
endif

DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs

EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Scripts/android-configure.sh \
	Scripts/linux-to-win-cross-configure.sh Scripts/build-test-tarball.mk.in \
    CMakeLists.txt $(cmake_files) sndfile.pc.cmake.in

cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \
	cmake/CMakeAutoGen.cmake cmake/CMakeAutoGenScript.cmake \
	cmake/FindFLAC.cmake cmake/FindOgg.cmake cmake/FindSndio.cmake \
	cmake/FindSpeex.cmake cmake/FindSQLite3.cmake cmake/FindVorbis.cmake \
	cmake/SndFileChecks.cmake cmake/TestInline.cmake \
	cmake/TestLargeFiles.cmake cmake/LibSndFileConfig.cmake.in \
	cmake/TestInline.c.in

CLEANFILES = *~

pkgconfig_DATA = sndfile.pc

m4datadir = $(datadir)/aclocal

#===============================================================================

test: check-recursive

# Target to make autogenerated files.
checkprograms :
	(cd src ; $(MAKE) libsndfile.la checkprograms)
	(cd tests ; $(MAKE) checkprograms)

testprogs :
	(cd src ; $(MAKE) testprogs)
	(cd tests ; $(MAKE) testprogs)


test-tarball : Scripts/build-test-tarball.mk
	(cd src ; $(MAKE) all libsndfile.la checkprograms)
	(cd tests ; $(MAKE) all checkprograms)
	$(MAKE) -f Scripts/build-test-tarball.mk
